<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>jb-aptech毕业设计项目</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
<script src="../script/common.js"></script>
<script type="text/javascript">
 function jump (){
  if($("#pageNo").val()>'${page.totalPages}'||$("#pageNo").val()<0){
 		alert("您输入的页码有误，请重新输入！");
 		return false;
 	}
 	return true;
 	//alert("sdfgthy");||$("#pageNO").val()>'${page.totalPages}'||$("#pageNO").val()==""
}
</script>
</head>
<body>
<form action="pageList.action" method="post">
<div class="page_title">数据字典管理</div>
<div class="button_bar">
	<button class="common_button" onclick="help('');">帮助</button>
	<button class="common_button" onclick="to('dict_add.jsp');">新建</button>
<!-- 	<button class="common_button" onclick="reload();">查询</button>   -->
<input type="submit"  value="查询"/>
</div>

<table class="query_form_table">
	<tr>
		<th>类别</th>
		<td><input name="basDict.dictType" value="${basDict.dictType}"/></td>
		<th>条目</th>
		<td><input name="basDict.dictItem" value="${basDict.dictItem}"/></td>
		<th>值</th>
		<td><input  name="basDict.dictValue" value="${basDict.dictValue}"/></td>
	</tr>
</table>
<br />
<table class="data_list_table">
	<tr>
		<th>编号</th>
		<th>类别</th>
		<th>条目</th>
		<th>值</th>
		<th>是否可编辑</th>
		<th>操作</th>
	</tr>
	
	
	<c:forEach var="basd" items="${basdList}" varStatus="stat">
		<tr <c:if test="${stat.index%2==0}">bgcolor="yellow"</c:if>>
		<td class="list_data_number">${basd.dictId }</td>
		<td class="list_data_ltext">${basd.dictType }</td>
		<td class="list_data_text">${basd.dictItem }</td>
		<td class="list_data_text">${basd.dictValue }</td>
		<td class="list_data_text">${basd.dictIsEditable }</td>
		<td class="list_data_op">
			<img onclick="to('doUpdate.action?id=${basd.dictId}');" title="编辑" src="../images/bt_edit.gif" class="op_button" />
			<img onclick="del('delete.action?id=${basd.dictId}');" title="删除" src="../images/bt_del.gif" class="op_button" />
		</td>
		</tr>
		</c:forEach>
	
	<tr>
		<th colspan="6" class="pager">
	
<div class="pager">
	共${totalCount}条记录 每页<input value="${page.pageSize}" size="2" />条
	第<input value="${page.pageNo}" size="2"/>页/共${page.totalPages}页
	<a href="pageList.action?pageNo=1">第一页</a>
	<a href="pageList.action?pageNo=${page.pageNo-1}">上一页</a>
	<a href="pageList.action?pageNo=${page.pageNo+1}">下一页</a>
	<a href="pageList.action?pageNo=${page.totalPages}">最后一页</a>
	转到<input value="${page.pageNo}" size="2" name="pageNo" id="pageNo"/>页
	<input type="submit" value="GO" onclick="return jump()"/>
</div>

		</th>
	</tr>
</table>
</form>
</body>
</html>